﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NETMovie.UI.WebMVC.Models.EditProfileViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	EditProfile
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsContent" runat="server">
    <script src="/Scripts/jquery/jquery-1.5.1.min.js" type="text/javascript" language="javascript"></script>
    <script src="/Scripts/jquery/jquery-ui-1.8.13.custom.min.js" type="text/javascript" language="javascript"></script>
    <link rel="Stylesheet" type="text/css" href="/Content/jquery/jquery-ui-1.8.13.custom.css" />
    <script type="text/javascript">
        $(function () {
            $(".datePicker").datepicker();
            $(".datePicker").datepicker("option", "dateFormat", "dd/mm/yy");
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit Profile</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true, "Edit account was unsuccessful. Please correct the errors and try again.") %>
        
        <fieldset>
            <legend>Account Information</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.UserName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.UserName, new { @class = "input_ro", @readonly = "readonly" } ) %>
                <%: Html.ValidationMessageFor(model => model.UserName) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Email) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Email) %>
                <%: Html.ValidationMessageFor(model => model.Email) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.AddressLine1) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.AddressLine1) %>
                <%: Html.ValidationMessageFor(model => model.AddressLine1) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.AddressLine2) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.AddressLine2) %>
                <%: Html.ValidationMessageFor(model => model.AddressLine2) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.City) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.City) %>
                <%: Html.ValidationMessageFor(model => model.City) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Country) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(m => m.Country, Model.Countries)%>
                <%: Html.ValidationMessageFor(m => m.Country)%>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.PostalCode) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.PostalCode) %>
                <%: Html.ValidationMessageFor(model => model.PostalCode) %>
            </div>

            <div>
                <input type="submit" value="Save" />
                <input type="reset" value="Reset" />
            </div>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

